<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        #top{
            width: 100%;
            height: 80px;
            background-color: cornsilk;
        }
        #top table{
            width: 100%;

        }
        #top .td_01{
            width: 10%;

        }
        #top .td_02{
            width: 60%;
        }
        #top .td_03{
            width: 20%;
        }
        #top .td_04{
            width: 10%;
        }
        .txt{

        }
    </style>
</head>
<body>
<div id="top">
    <table>
        <tr>
            <td rowspan="2" class="td_01">
            </td>
            <td rowspan="2" class="td_02 txt">
                饱了吗后台管理
            </td>
            <td class="td_03">
                欢迎<span>[****]</span>登录
            </td>
            <td class="td_04">
                <a href="">注销</a>
            </td>
        </tr>
        <tr>
            <td id="t">

            </td>
        </tr>
    </table>
</div>
</body>
<script>
    var xm = document.getElementById("t");
    function chenge(x) {
        var n = x;
        if (x<10){
            n="0"+x;
        }
        return n;
    }
    function show() {
    var date = new Date();
    var y = date.getFullYear();
    var M = date.getMonth()+1;
    var d = date.getDate();
    var h = date.getHours();
    var m = date.getMinutes();
    var s = chenge(date.getSeconds());
    // s=chenge(s);
    xm.innerHTML= y+'-'+M+'-'+d+"&nbsp"+h+":"+m+":"+s;

}
    setInterval("show()",);


// function getCurDate() {
//     let now = new Date();
//     let year = now.getFullYear();
//     let month = now.getMonth() + 1;
//     let day = now.getDate();
//     month = month < 10 ? "0" + month : month;
//     day = day < 10 ? "0" + day : day;
//     return year + "-" + month + "-" + day;
// }

</script>
</html>